<%@page import="cn.yunhe.biz.CateBizImpl"%>
<%@page import="cn.yunhe.biz.ICateBiz"%>
<%@page import="cn.yunhe.model.Cate"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%
	request.setCharacterEncoding("UTF-8");
	String ccid= request.getParameter("cid");
	String cname= request.getParameter("cname");
	
	int cid=Integer.parseInt(ccid);
	
	Cate cate=new Cate();
	cate.setCateId(cid);
	cate.setCateName(cname);
	
	ICateBiz cateBiz=new CateBizImpl();
	
	 boolean flag=cateBiz.updateCateById(cate);
	 
	 if(flag){
		 response.sendRedirect("listcate.jsp");
	 }else{
		 response.sendRedirect("editCate.jsp");
	 }
	
	
%>